21 research outputs found
The Foil: Capture-Avoiding Substitution With No Sharp Edges
Correctly manipulating program terms in a compiler is surprisingly difficult
because of the need to avoid name capture. The rapier from "Secrets of the
Glasgow Haskell Compiler inliner" is a cutting-edge technique for fast,
stateless capture-avoiding substitution for expressions represented with
explicit names. It is, however, a sharp tool: its invariants are tricky and
need to be maintained throughout the whole compiler that uses it. We describe
the foil, an elaboration of the rapier that uses Haskell's type system to
enforce the rapier's invariants statically, preventing a class of hard-to-find
bugs, but without adding any run-time overheads.Comment: Presented at IFL 202
Firefly Monte Carlo: Exact MCMC with Subsets of Data
Markov chain Monte Carlo (MCMC) is a popular and successful general-purpose tool for Bayesian inference. However, MCMC cannot be practically applied to large data sets because of the prohibitive cost of evaluating every likelihood term at every iteration. Here we present Firefly Monte Carlo (FlyMC) an auxiliary variable MCMC algorithm that only queries the likelihoods of a potentially small subset of the data at each iteration yet simulates from the exact posterior distribution, in contrast to recent proposals that are approximate even in the asymptotic limit. FlyMC is compatible with a wide variety of modern MCMC algorithms, and only requires a lower bound on the per-datum likelihood factors. In experiments, we find that FlyMC generates samples from the posterior more than an order of magnitude faster than regular MCMC, opening up MCMC methods to larger datasets than were previously considered feasible.Engineering and Applied Science
Recommended from our members
Flash Memory: Photochemical Imprinting of Neuronal Action Potentials onto a Microbial Rhodopsin
We developed a technique, âflash memoryâ, to record a photochemical imprint of the activity stateâfiring or not firingâof a neuron at a user-selected moment in time. The key element is an engineered microbial rhodopsin protein with three states. Two nonfluorescent states, D1 and D2, exist in a voltage-dependent equilibrium. A stable fluorescent state, F, is reached by a photochemical conversion from D2. When exposed to light of a wavelength λwrite, population transfers from D2 to F, at a rate determined by the D1 â D2 equilibrium. The population of F maintains a record of membrane voltage which persists in the dark. Illumination at a later time at a wavelength λread excites fluorescence of F, probing this record. An optional third flash at a wavelength λreset converts F back to D2, for a subsequent writeâread cycle. The flash memory method offers the promise to decouple the recording of neural activity from its readout. In principle, the technique may enable one to generate snapshots of neural activity in a large volume of neural tissue, e.g., a complete mouse brain, by circumventing the challenge of imaging a large volume with simultaneous high spatial and high temporal resolution. The proof-of-principle flash memory sensors presented here will need improvements in sensitivity, speed, brightness, and membrane trafficking before this goal can be realized
Getting to the Point. Index Sets and Parallelism-Preserving Autodiff for Pointful Array Programming
We present a novel programming language design that attempts to combine the
clarity and safety of high-level functional languages with the efficiency and
parallelism of low-level numerical languages. We treat arrays as
eagerly-memoized functions on typed index sets, allowing abstract function
manipulations, such as currying, to work on arrays. In contrast to composing
primitive bulk-array operations, we argue for an explicit nested indexing style
that mirrors application of functions to arguments. We also introduce a
fine-grained typed effects system which affords concise and
automatically-parallelized in-place updates. Specifically, an associative
accumulation effect allows reverse-mode automatic differentiation of in-place
updates in a way that preserves parallelism. Empirically, we benchmark against
the Futhark array programming language, and demonstrate that aggressive
inlining and type-driven compilation allows array programs to be written in an
expressive, "pointful" style with little performance penalty.Comment: 31 pages with appendix, 11 figures. A conference submission is still
under revie
Recommended from our members
Timekeeping with electron spin states in diamond
Frequency standards based on atomic states, such as Rb or Cs vapors, or single-trapped ions, are the most precise measures of time. Here we propose and analyze a precision oscillator approach based upon spins in a solid-state system, in particular, the nitrogen-vacancy defect in single-crystal diamond. We show that this system can have stability approaching portable atomic standards and is readily incorporable as a chip-scale device. Using a pulsed spin-echo technique, we anticipate an Allan deviation of Ïy=10â7Ïâ1/2 limited by thermally-induced strain variations; in the absence of such thermal fluctuations, the system is limited by spin dephasing and harbors an Allan deviation nearing âŒ10â12Ïâ1/2. Potential improvements based upon advanced diamond material processing, temperature stabilization, and nanophotonic engineering are discussed.Physic
Convolutional Networks on Graphs for Learning Molecular Fingerprints.
We introduce a convolutional neural network that operates directly on graphs. These networks allow end-to-end learning of prediction pipelines whose inputs are graphs of arbitrary size and shape. The architecture we present generalizes standard molecular feature extraction methods based on circular fingerprints. We show that these data-driven features are more interpretable, and have better predictive performance on a variety of tasks.Chemistry and Chemical Biolog
All-optical electrophysiology in mammalian neurons using engineered microbial rhodopsins
All-optical electrophysiologyâspatially resolved simultaneous optical perturbation and measurement of membrane voltageâwould open new vistas in neuroscience research. We evolved two archaerhodopsin-based voltage indicators, QuasAr1 and QuasAr2, which show improved brightness and voltage sensitivity, have microsecond response times and produce no photocurrent. We engineered a channelrhodopsin actuator, CheRiff, which shows high light sensitivity and rapid kinetics and is spectrally orthogonal to the QuasArs. A coexpression vector, Optopatch, enabled cross-talkâfree genetically targeted all-optical electrophysiology. In cultured rat neurons, we combined Optopatch with patterned optical excitation to probe back-propagating action potentials (APs) in dendritic spines, synaptic transmission, subcellular microsecond-timescale details of AP propagation, and simultaneous firing of many neurons in a network. Optopatch measurements revealed homeostatic tuning of intrinsic excitability in human stem cellâderived neurons. In rat brain slices, Optopatch induced and reported APs and subthreshold events with high signal-to-noise ratios. The Optopatch platform enables high-throughput, spatially resolved electrophysiology without the use of conventional electrodes